//
//  PowerOfAttorneryViewModel.m
//  GLGW_Shoping
//
//  Created by yang on 2018/12/6.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "PowerOfAttorneryViewModel.h"

@interface PowerOfAttorneryViewModel ()

@end

@implementation PowerOfAttorneryViewModel

-(instancetype)initWithViewToViewScrollView:(UIScrollView *)scrollView theSuperView:(UIView *)superView{
    if (self = [super initWithViewToViewScrollView:scrollView theSuperView:superView]) {
        scrollView.y = scrollView.y+kHeightProportion_In_iPhoneTriploid(10);
        scrollView.height = scrollView.height - kHeightProportion_In_iPhoneTriploid(10);
        [superView addSubview:scrollView];
        //
        GLGWImageView * powerImageView = [[GLGWImageView alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(90), kHeightProportion_In_iPhoneTriploid(38), KScreenWidth - kWidthProportion_In_iPhoneTriploid(180), kHeightProportion_In_iPhoneTriploid(273)) inSuperView:scrollView];
        powerImageView.backgroundColor = kRandomColor;
        //
        NSArray * titArr = @[@"下载授权书PDF模板",@"发送授权书图片模板到微信"];
        for (int i=0; i<2; i++) {
            GLGWButton * p_but = [[GLGWButton alloc] initWithFrame:CGRectMake(kWidthProportion_In_iPhoneTriploid(15), kY_With_View(powerImageView, 66)+kHeightProportion_In_iPhoneTriploid(68)*i, KScreenWidth - kWidthProportion_In_iPhoneTriploid(30), kHeightProportion_In_iPhoneTriploid(44)) hTitle:titArr[i] titleLableFont:SYSTEMFONT(16) titleLableColor:[UIColor whiteColor] theCornerRadius:kHeightProportion_In_iPhoneTriploid(22) backgroundColr:kColor_Rule_Yellow inSuperView:scrollView];
            p_but.tag = 160+i;
            scrollView.contentSize = CGSizeMake(scrollView.width, kX_With_View(p_but, 10));
        }
    }
    return self;
}

@end
